feat: add external_id and metadata to organization resource#7
feat: add external_id and metadata to organization resource#7danielloader wants to merge 4 commits into
Conversation
Support optional external_id (string) and metadata (map of string) fields on the workos_organization resource, matching the WorkOS API Create/Update Organization endpoints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Had to attempt a fix on the updated_at again as the test suite failed for me using a WORKOS_API_KEY for the full test suite: |
Replace UseStateForUnknown on updated_at across all four resources with a custom plan modifier that preserves the state value when no config attributes changed, but marks it unknown when they have. This prevents both no-op plan drift and "inconsistent result after apply" errors on real updates. Also fix user resource to always send email_verified in update requests, preventing the API from resetting it to false when the email changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extend the workos_organization data source to support lookup by external_id (via GET /organizations/external_id/:id), alongside the existing id and domain lookup keys. Also exposes external_id and metadata as computed outputs on the data source. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Additional:
|
… metadata Add external_id and metadata to organization resource and data source examples. Add external_id lookup example to organization data source. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-metadata feat: add external_id and metadata to organization resource
|
Merged manually after rebasing onto main to resolve conflicts with #10 (domain uniqueness validation). All commits included, build and tests pass. |
Summary
external_id(string) andmetadata(map of string) attributes to theworkos_organizationresourceTest plan
go build ./...passesgo vet ./...passesgo test ./internal/provider/ -run TestAccOrganizationResource_WithMetadataAndExternalID -vpasses withWORKOS_API_KEYset🤖 Generated with Claude Code